# Maintainer: Alexander Epaneshnikov <alex19ep@archlinux.org>

pkgname=esh
pkgver=0.3.2
pkgrel=1
pkgdesc="Simple templating engine based on shell"
arch=('any')
url="https://github.com/jirutka/esh"
license=('MIT')
depends=('gawk' 'sed')
makedepends=('asciidoctor')
source=("$pkgname-$pkgver.tar.gz::https://github.com/jirutka/esh/archive/v${pkgver}/esh-${pkgver}.tar.gz")
sha512sums=('f93835f0c28b75fa4b4ab2fdccd860050e4dde25634074065b182f289dd36d05074c7a5762f6cd35f409ae2ef239de5e0799af70ec6a96ba63df50fc8c123784')
b2sums=('3e979edc98192e52ef0bacfb069d3a53d29303a361ba9e26e71e08079690c26a6448c4837b5c7ccebfbadad23c25dc0547931143bd0dbc5e30c30c5d3e229914')

build() {
	cd "$pkgname-$pkgver"
	make man
}

check() {
	cd "$pkgname-$pkgver"
	make test
}

package() {
	cd "$pkgname-$pkgver"
	make prefix=/usr/ DESTDIR="$pkgdir/" install
	install -vDm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
